/*
 * @Author: 肖思汗 
 * @Date: 2019-08-18 13:27:09 
 * @Last Modified by: xiaosihan
 * @Last Modified time: 2021-06-06 15:09:00
 */
//
// 异常页面
import Error404 from '@pages/404/Error404'; // 404
import { Dev } from '@pages/Dev/Dev';
// 主页
import Home from '@pages/home/Home';
// 布局
import Layout from '@pages/layout/Layout';
import XshReactThreeUiDemo from '@pages/XshReactThreeUiDemo/XshReactThreeUiDemo';

import ReactMixinComponent from '@ReactMixinComponent';
import React from 'react';
import { Route, Router, Switch } from 'react-router-dom';


interface Props {
}

interface State {
}

export default class Routers extends ReactMixinComponent<Props, State> {
    constructor(props: Props) {
        super(props);
    }

    render() {
        return (
            <Layout>
                <Router history={this.mixin_history}>
                    <Switch>
                        <Route exact path={["/", "/home"]} component={Home} />
                        <Route exact path={["/xsh_react_three_ui"]} component={XshReactThreeUiDemo} />
                        <Route exact path={["/xsh_react_three_ui/:path"]} component={XshReactThreeUiDemo} />
                        <Route exact path="/dev" component={Dev} />
                        <Route path="*" component={Error404} />
                    </Switch>
                </Router>
            </Layout>
        );
    }
}